package com.cskaoyan.vo;

import lombok.Data;

/**
 * @description:
 * @author: libugu@cskaoyan.com
 * @date 2021/4/8 - 17:33
 */

@Data
public class BaseRespVo<T> {

    T data;
    String errmsg;
    Integer errno;

    public static BaseRespVo ok(){

        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setErrmsg("成功");
        baseRespVo.setErrno(0);
        return baseRespVo;
    }

    public static BaseRespVo ok(Object data){

        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setData(data);
        baseRespVo.setErrmsg("成功");
        baseRespVo.setErrno(0);
        return baseRespVo;
    }
    public static BaseRespVo orderFail(){
        BaseRespVo baseRespVo = new BaseRespVo();
        baseRespVo.setErrno(621);
        baseRespVo.setErrmsg("订单退款失败");
        return baseRespVo;
    }



}
